﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace BLL
{
   public class HopDongDienBLL : DAL.HopDongDienDAL
    {
       DAL.HopDongDienDAL _dal = new DAL.HopDongDienDAL();
        
        public string create_ID()
        {
            string a = _dal.select_max();
            string b = "";
            if (a.Length > 2)
            {
                b = a.Substring(2);
            }
            else
                b = "0";

            int c = Convert.ToInt32(b);
            c++;
            return "HD"+c.ToString();
        }
       
    }
}
